import request from "@/utils/request"

const perfix = "/stu"

// 获取用户列表
export const getUserList = (data) => {
  return request({
    url: `${perfix}/userList`,
    method: "post",
    data
  })
}


// 删除用户
export const delUser = (id) => {
  return request({
    url: `${perfix}/del?id=${id}`,
    method: "delete"
  })
}


// 修改用户列表
export const updateUser = (data) => {
  return request({
    url: `${perfix}/update`,
    method: "post",
    data
  })
}

// 修改状态
export const updateStatus = (id, status) => {
  return request({
    url: `${perfix}/updateStatus?status=${status}&id=${id}`,
    method: "post"
  })
}

// 添加用户
export const addAdminUser = (data) => {
  return request({
    url: `${perfix}/addUser`,
    method: "post",
    data
  })
}



// 修改用户
export const UpdateByLogin = (data) => {
  return request({
    url: `/stu/update/login`,
    method: "post",
    data
  })
}